import 'package:fish_redux/fish_redux.dart';

enum SmsLoginAction { login, loading, switchLgin, sms, setRemain, setSmsId }

class SmsLoginActionCreator {
  static Action onLoginAction() {
    return const Action(SmsLoginAction.login);
  }

  static Action onSwitchAction() {
    return const Action(SmsLoginAction.switchLgin);
  }

  static Action onLoadingAction(bool isLoading) {
    return Action(SmsLoginAction.loading, payload: isLoading);
  }

  static Action onSetRemainAction(int seconds) {
    return Action(SmsLoginAction.setRemain, payload: seconds);
  }

  static Action onSendSms() {
    return Action(SmsLoginAction.sms);
  }

  static Action onSetSmsId(String smsId) {
    return Action(SmsLoginAction.setSmsId, payload: smsId);
  }
}
